package org.lvxiao.example.redis.lock;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface DistributionSynchronized {

	/**
	 * 锁过期时间
	 * 
	 * @return
	 */
	long expire() default 30000;

	/**
	 * 等待锁时间
	 * 
	 * @return
	 */
	long blockTime() default 30000;
	
	/**
	 * 锁前缀
	 * @return
	 */
	String prefix();
	
	/**
	 * 锁名称 prefix+ :: +key = 锁KEY
	 * @return
	 */
	String key() default "";
	
	
}
